import { getSvgIconText } from '@/assets/icons';
import VuiElement from '../../base/element';
import './style.css';
/**
 * 箭头类
 */
export default class VuiArrow extends VuiElement {
  constructor(arrowName, isSplit = false) {
    super();
    this.arrowName = arrowName;
    this._className = {
      container: isSplit ? 'vui-arrow-container-split' : 'vui-arrow-container',
      svg: 'vui-arrow'
    };
  }

  initUI() {
    const cls = this._className;
    this.container = this.createDiv(cls.container);
    this.container.innerHTML = getSvgIconText(this.arrowName, cls.svg);
  }
}
